<div class="boxed">
    <div id="content-container">
        <div id="page-title">
            <h1 class="page-header text-overflow">Data Tables</h1>
            <div class="searchbox">
                <div class="input-group custom-search-form">
                    <input type="text" class="form-control" placeholder="Search..">
                    <span class="input-group-btn">
                        <button class="text-muted" type="button"><i class="demo-pli-magnifi-glass"></i></button>
                    </span>
                </div>
            </div>
        </div>
        <ol class="breadcrumb">
            <li><a href="{:url('Admin/Index/index')}">首页</a></li>
            <li>陪玩控制台</li>
            <li class="active">用户管理</li>
        </ol>
        <div id="page-content">
            <div class="panel">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        <button class="btn btn-primary" onclick="bindConfig()">
                            添加标签
                        </button>
                    </h3>
                </div>
                <div class="panel-body">
                    <table id="demo-dt-basic" class="table table-striped table-bordered" cellspacing="0" width="100%">
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>标签名</th>
                            <th>添加时间</th>
                            <th>标签用户</th>
                            <th align="center">是否显示</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach name="list" id="v"}
                        <tr>
                            <td>{$v['tag_id']}</td>
                            <td>{$v['tag_name']}</td>
                            <td>{$v['tag_addtime']}</td>
                            <td>
                                <a href="/index.php/Admin/user/indexUser?user_leavel={$v['tag_id']}">
                                   <button class="btn btn-xs btn-default"> {$v.total} </button>
                                </a>
                                人</td>
                            <td align="center">
                                {eq name="$v.tag_show" value="1"}
                                <button class="btn btn-xs btn-success">显示</button>
                                {else/}
                                <button class="btn btn-xs btn-default">隐藏</button>
                                {/eq}
                            </td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 修改菜单模态框结束 -->
<script type="text/javascript">
    function bindConfig() {
        localStorage.setItem('editor','');
        layerBox.show('在线代码编辑器',['60%', '70%'],'/index.php/Admin/editor?ename=editor');
    }
    function saveEditor(value) {
        console.log(value);
        $.post('/index.php/Admin/play/game?act=edit', {value:value}, function(data) {
            layer.msg(data.msg,{time:3000},function () {
                if(data.code > 0){
                    EditorClose();
                    setTimeout(function () {
                        location.reload();
                    },200)
                }
            });
        });
    }
    function EditorClose() {
        layer.closeAll();
    }
</script>